clear all
log close
log using "Judicial Selection and Criminal Punishment Appendix Log", replace text
use "Judicial Selection and Criminal Punishment Data.dta"

********************************************************************************
********************************************************************************
*****  	            Judicial Selection and Criminal Punishment:			   *****
*****  Trial Court Elections, Sentencing, and Incarceration in the States  *****
*****					 		ONLINE APPENDIX							   *****
*****                       Author: Travis N. Taylor                       *****
*****                       Last Edited: 12 NOV 2020                       *****
********************************************************************************
********************************************************************************

*********************
*** DV Histograms ***
*********************

hist incarcerationrate_change, normal saving(inchist)
hist sentencerate_change, normal saving(senthist)


graph combine inchist.gph senthist.gph, saving(fA1)
	

****************************************
*** Alternative Model Specifications ***
**************************************** 

*** Table A1
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l1a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l2a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l4a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l5a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)

*** Table A2
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l1a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l2a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l4a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l5a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)

	
*** Table A4
xtpcse incarcerationrate_change i.retentionelex c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
	estimates store m1
	
xtgls incarcerationrate_change i.retentionelex c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., panels(iid) corr(psar1) nmk force
	
	estimates store m1a
	
xtreg incarcerationrate_change i.retentionelex c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., cluster(stateid)
	
	estimates store m1b
	
*** Table A5
xtpcse incarcerationrate_change i.retentionelex##c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a !=., p correlation(p)
	
	estimates store m2
	
xtgls incarcerationrate_change i.retentionelex##c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a !=., panels(iid) corr(psar1) nmk force
	
	estimates store m2a
	
xtreg incarcerationrate_change i.retentionelex##c.berrycitizen_l3a 			 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm incarcerationrate_change_l1 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a !=., cluster(stateid)
	
	estimates store m2b
	
*** Table A7
xtpcse sentencerate_change i.retentionelex c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
	estimates store m3
	
xtgls sentencerate_change i.retentionelex c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., panels(iid) corr(psar1) nmk force	
	
	estimates store m3a
	
xtreg sentencerate_change i.retentionelex c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., cluster(stateid)
	
	estimates store m3b
	
*** Table A8
xtpcse sentencerate_change i.retentionelex##c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., p correlation(p)
	
	estimates store m4
	
xtgls sentencerate_change i.retentionelex##c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., panels(iid) corr(psar1) nmk force	
	
	estimates store m4a
	
xtreg sentencerate_change i.retentionelex##c.berrycitizen_l3a 		 		 ///
	arrestrate_l1 noiac dsl mand_min sentencecomm sentencerate_change_l1	 ///
	electedpros termlength recall divgov berrygovt							 ///
	south blackpop_log c.blackpop_log#c.blackpop_log bach_log stateincome_l1 ///
	if stateid!=11 & berrycitizen_l3a!=., cluster(stateid)
	
	estimates store m4b

*** End of file
